#ifndef _BSP_DEC_FONT_H_
#define _BSP_DEC_FONT_H_

#include "main.h"
#include "bsp_sram.h"

#define GB2312_FONT_SIZE                16
#define GB2312_FONT_SHADE_SIZE          32      //一个字32字节大小
#define GB2312_FONT_DISTINGUISH_NUM     94      //一个区94个字
#define GB2312_FONT_DISTINGUISH_SIZE    (GB2312_FONT_SHADE_SIZE * GB2312_FONT_DISTINGUISH_NUM)
#define GB2312_SHADE_MEM_A_START_ADDR   GB2312_SHADE_MEM_START_ADDR
#define GB2312_SHADE_MEM_B_START_ADDR   (GB2312_SHADE_MEM_START_ADDR + GB2312_FONT_DISTINGUISH_SIZE * 9)



void bsp_switch_utf8_to_gb2312(uint8_t *pu8utf8,uint16_t u16arrlen);
uint8_t bsp_search_gb2312(uint16_t *pu16utf16);
uint8_t  bsp_get_utf8charbytenum(uint8_t u8Data);
uint8_t  bsp_is_utf8format(const uint8_t *pu8str);
uint8_t  bsp_utf8tounicode(uint8_t *u8utf8, uint32_t *u32unicode);
uint8_t bsp_unicodetoutf16(uint32_t u32unicode, uint16_t *pu16utf16);
uint32_t bsp_get_utf8length(const uint8_t *pu8str);
uint32_t bsp_get_gb2312_sramaddr(uint16_t u16gb2312code);


#endif /* _BSP_DEC_FONT_H_ */
